package com.itheima.service;

import com.itheima.dao.UserDao;
import com.itheima.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class UserServiceB {
    @Autowired
    private UserDao userDao;
    public List<User> operator(){
        List<User> users = userDao.operator();
        for (User user :users) {
            user.getAddress().setProvince(user.getAddress().getProvince() + " 省/市666");
            user.getAddress().setCity(user.getAddress().getCity() + " 市/区666");
        }
        return users;
    }
}
